class AlbumVo {
  final String? id;
  final String? name;
  final String? cover;
  final String? sort;
  final String? imgCount;
  final String? collectionCount;
  final String? uid;
  final String? username;
  final String? avatar;

  AlbumVo({
    this.id,
    this.name,
    this.cover,
    this.sort,
    this.imgCount,
    this.collectionCount,
    this.uid,
    this.username,
    this.avatar,
  });

  Map<String, dynamic> toJson() {
    return {
      'id': id,
      'name': name,
      'cover': cover,
      'sort': sort,
      'imgCount': imgCount,
      'collectionCount': collectionCount,
      'uid': uid,
      'username': username,
      'avatar': avatar,
    };
  }

  factory AlbumVo.fromJson(Map<String, dynamic> json) {
    return AlbumVo(
      id: json['id'] as String?,
      name: json['name'] as String?,
      cover: json['cover'] as String?,
      sort: json['sort'] as String?,
      imgCount: json['imgCount'] as String?,
      collectionCount: json['collectionCount'] as String?,
      uid: json['uid'] as String?,
      username: json['username'] as String?,
      avatar: json['avatar'] as String?,
    );
  }
}

class AlbumVoList {
  final List<AlbumVo>? albumVos;

  AlbumVoList({
    this.albumVos,
  });

  Map<String, dynamic> toJson() {
    return {'albumVos': albumVos?.map((v) => v.toJson()).toList()};
  }

  factory AlbumVoList.fromJson(List<dynamic> json) {
    List<AlbumVo>? albumVosList = json.map<AlbumVo>((v) => AlbumVo.fromJson(v)).toList();
    return AlbumVoList(
      albumVos: albumVosList,
    );
  }
}
